//获取应用实例
const app = getApp();
// 引入AES.js
var baseJs = require("../../common/base.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {
    uid: "",
    BusinessIsFinishEnter: "",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var BusinessIsFinishEnter = wx.getStorageSync('BusinessIsFinishEnter');
    this.setData({
      uid: wx.getStorageSync('uid'),
      BusinessIsFinishEnter: BusinessIsFinishEnter,
    })
    

  },

  //  点击商户入驻跳转到商户入驻页面
  ToIn() {
    var BusinessIsFinishEnter = wx.getStorageSync('BusinessIsFinishEnter');
    if (BusinessIsFinishEnter == '1') {
      wx.showToast({
        title: '您已成为商户！',
        icon: 'none',
        duration: 1000
      });
    } else {
      wx.navigateTo({
        url: '/packageA/merchants/merchants',
      })
    }
  },
  //点击实名认证跳转到实名认证页面
  ToCertification() {
    wx.navigateTo({
      url: '/packageA/realnameauthentication/realnameauthentication',
    })
  },
  // 点击商家设置跳转到商家设置页面
  ToSetUp() {
    wx.navigateTo({
      url: '/packageA/businessSetting/businessSetting',
    })
  },
  // 点击营业执照上传跳转到营业执照上传页面
  ToBusiness() {
    wx.navigateTo({
      url: '/packageA/uploadbusiness/uploadbusiness',
    })
  },
  //点击店铺实景图上传跳转到店铺实景图上传页面
  ToStore() {
    wx.navigateTo({
      url: '/packageA/stores/stores',
    })
  },
  //点击合照上传跳转到合照上传页面
  ToGroupPhoto() {
    wx.navigateTo({
      url: '/packageA/photoupload/photoupload',
    })
  },
  //点击产品上传跳转到产品上传页面
  ToProduct() {
    wx.navigateTo({
      url: '/packageA/classification/classification',//商品分类
    })
  },
  // 点击个人权限开通跳转到个人权限开通页面
  ToPersonalRights() {
    wx.navigateTo({
      url: '/packageB/permissiontoopen/permissiontoopen',
    })
  },
  // 点击缴纳保证码跳转保证码页面
  toEnsureCode: function () {
    wx.navigateTo({
      url: '/packageA/toEnsureCode/toEnsureCode',
    })
  },
})